<!-- Panel -->
<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">


<?php
require_once("functions/session.php");

if( !isset($_SESSION['id'])):
?>

	<!-- Login Form -->
	<div class="left">	
		<h1>L O G I N </h1>
		<form class="clearfix" action="../functions/login.php" method="post">

			<label for="username"><font color="white">Username:</font></label>
			<input class="field" type="text" name="username" id="username" size="23" />
	
			<label for="password"><font color="white">Password:</font></label>
			<input class="field" type="password" name="password" id="password" size="23" />
	
			<!--<label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /><font color="white">Remember me</font></label>-->
			<div class="clear"></div>
	
			<input type="button" id="bt_login" />
		</form>
	</div>


	<!-- Register Form -->
	<div class="bar">					
		<h1>R E G I S T E R </h1>		
		<form action="" method="post">
		
		<label for="username"><font color="white">Username:</font></label>
		<input class="field" type="text" name="register_username" id="register_username" value="" size="23" />
		
		<label for="email"><font color="white">Password:</font></label>
		<input class="field" type="password" name="register_password" id="register_password" size="23" />
		<input type="button" id="bt_register" />
		</form>
	</div>
	
	<div class="left right">
		<a href="user_help.html" target="_blank" class="help">Help</a>
	</div>
  
<?php

else:

?>
            
<div class="left right">
	<a id="logout" accesskey="l">Logout</a>
	<a href="user_help.html" target="_blank" class="help" accesskey="h">Help</a>
	<a id="closeAccnt" class="xAccnt">Close Account</a>
</div>
<div class="left">

	<h1><span id="username_lable"><?php echo($_SESSION['usr'])?>'s Projects</span></h1>
	<!-- This div is used to place the projects list in. See get_projects.php and the
	getProjects() javascript function.-->
	<div id="user_projects"></div>

</div>
            
            
			
	<!--****************New Project Form***************************-->
	<div class="left right">
		<div id="contactFormContainer">
			<div id="contactForm">
				<fieldset>
					<label for="Name">NAME YOUR PROJECT:</label>
					<input id="name" name="PName" type="text" />
					<input id="add_project_button" type="submit" name="submit" value="Create" />
				</fieldset>
			</div>
			<div id="newProjectButton" accesskey="p"></div>
		</div>
	</div>
		          
<?php
endif;
?>
		</div>
	</div> <!-- /login -->	

    <!-- The tab on top -->	
	<div class="tab">
		<ul class="login">
	    	<li class="left">&nbsp;</li>
	        <li>Welcome, <?php echo @$_SESSION['usr'] ? $_SESSION['usr'] : 'Guest';?>!</li>
			<li class="sep">|</li>
			
			
			<li>
				<a id="open" href="#"><?php echo @$_SESSION['id']?'Open Panel':'Log In | Register';?></a>
			</li>
	    
	    
	    	<li class="right"></li>
		</ul> 
	</div> <!-- / top -->
	
</div> <!--panel -->
